package com.xiaoy.util;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;


public class SpringUtil {

	private static String[]xmls = new String[]{
		"/src/main/resources/applicationContext-bpm-activiti5.xml",
		"/src/main/resources/applicationContext-bpm.xml",
		"/src/main/resources/applicationContext-db.xml",
		"/src/main/resources/applicationContext-workspace.xml",
		"/src/main/resources/applicationContext.xml",
	};
	private static ApplicationContext ac = new FileSystemXmlApplicationContext(xmls);
	
	
	public static Object getService (String name) {
		
	    return ac.getBean(name);
	}
}
